package ThriftExam;

import org.apache.thrift.TException;
import org.apache.thrift.protocol.TBinaryProtocol;
import org.apache.thrift.protocol.TProtocol;
import org.apache.thrift.transport.TSocket;
import org.apache.thrift.transport.TTransport;
import org.apache.thrift.transport.TTransportException;

/**
 * Created with IntelliJ IDEA.
 * User: belict
 * Date: 12/2/13
 * Time: 12:52 PM
 * To change this template use File | Settings | File Templates.
 */
public class RunClient {
    public static void main(String[] args) throws TException {
        TTransport transport = new TSocket("localhost",9090);
        transport.open();
        TProtocol tProtocol = new TBinaryProtocol(transport);
        ThriftPrinter.Client client = new ThriftPrinter.Client(tProtocol);

        ThriftExam thriftExam = new ThriftExam("ThriftRpc",4);
        client.printResult(thriftExam);

    }
}
